package main;

public class Food {
	private int[] coordinate = new int[2];
	private int[] range;

	public Food(int row, int col) {
		this.coordinate = new int[] { (int) (Math.random() * row), (int) (Math.random() * col) };
		this.range = new int[] { row, col };
	}

	public int[] getCoord() {
		return coordinate;
	}

	public void flush() {
		this.coordinate[0] = (int) (Math.random() * range[0]);
		this.coordinate[1] = (int) (Math.random() * range[1]);
	}
}